<template>
  <div id="app">
    <transition :name="transitionName">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
// import { getLocal } from '@/utils/cache';
import {setModule} from '@/utils/common/auth';

export default {
  name: "App",
  data() {
    return {
      transitionName: ""
    };
  },
  created() {
    this.Init();
  },
  methods: {
    Init() {
    
    }
  },
  watch: {
    $route(to, from) {
      const toDepth = to.path.split("/").length;
      const fromDepth = from.path.split("/").length;
      this.transitionName = toDepth < fromDepth ? "slide-right" : "slide-left";
    }
  }
};
</script>

<style scoped>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  background: #fff;
  min-height: 100vh;
}
.fixed {
  position: fixed;
  left: 0;
  right: 0;
}
</style>
